package com.example.config;

import com.example.service.DeptService;
import org.dom4j.io.SAXReader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class CommonConfig {
    //    //声明第三方bean
    @Bean(name = "reader") //将当前方法的返回值对象交给IOC容器管理, 成为IOC容器bean
          //通过@Bean注解value/name指定bean的id, 默认为方法名
    public SAXReader saxReader(DeptService deptService){
        System.out.println(deptService);
        return new SAXReader();
    }
}
